#!/bin/bash

printf "\e[00;34mGetting the latest version\e[00m... "

(git status|grep 'nothing to commit' 1> /dev/null)

if [ ! $? -eq 0 ]
then
  set -e
  git stash 1> /dev/null
  git pull --rebase 1> /dev/null
  git stash pop 1> /dev/null
else
  set -e
  git pull --rebase 1> /dev/null
fi

echo "done"

printf "\e[00;34mBundling\e[00m... "
bundle 1> /dev/null
echo "done"
echo

rake
